#include <bits/stdc++.h>
using namespace std;

int n;
string path;

void dfs(int k)
{
	if(k == n + 1)
	{
		cout << path << endl;
		return;
	}
	path += "N";
	dfs(k + 1);
	path.pop_back();
	path += "Y";
	dfs(k + 1);
	path.pop_back();
}

int main()
{
	cin >> n;
	dfs(1);
	return 0;
}